/*
 * Created on Apr 6, 2004
 *
 */
package littlecyberwar.tool;

import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;
import java.awt.event.*;
import java.util.*;
import java.text.DecimalFormat;

import littlecyberwar.model.*;
import littlecyberwar.ui.*;
import littlecyberwar.util.Util;

import ModuleBuilder.model.*;

/**
 * @author Milton  Soong
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class MouseWatchHandler extends MultiSelectMouseHandler {

	public MouseWatchHandler() {
		super();
		unitSelectedText = "Check status of selected unit(s). You cannot move them.";
		noUnitSelectedText = "Select unit(s) to check their status.";
	}
	
//	public void mouseDragged( MouseEvent e ) {
//		// do nothing when something is dragged because we don't want stuff moving 
//	}
//	
	public void applyRemoteChange(Element elIn) {
		resetSelectedElements();
		addElementToSelected ( elIn );
		Shape s = elIn.getFinalShape();
		Rectangle r = s.getBounds();
		comp.scrollRectToVisible(r);
		return;
	}
	
	/**
	 * list contains one or more element who's moved
	 */
	public void applyRemoteChange( ArrayList list) {
		resetSelectedElements();
		addAllElementAsSelected(list);
		// Rectangle r = selectedArea.getBounds();
		Rectangle r = DirtyAreaManager.getDirtyArea();
		comp.scrollRectToVisible(r);
		return;
	}

}
